function save_res(id){
    var loc_rest = document.getElementById('inc_res').value;
    localStorage.setItem("restaurant_1", loc_rest);
}
function save_user(id){
    var loc_user = document.getElementById('inc_user').value;
    localStorage.setItem("user_1", loc_user);
}
function save_dis(id){
    var loc_dis = document.getElementById('inc_dis').value;
    localStorage.setItem("dis_1", loc_dis);
}
function save_price(id){
    var loc_pri = document.getElementById('inc_price').value;
    localStorage.setItem('pri_1',loc_pri);
}
function save_R2(rest){
    localStorage.setItem("rest_2",rest);
}
function save_ID(id){
    localStorage.setItem("dishes_ID",id);
}
function saveUserId(id){
    localStorage.setItem("user_ID",id);
}
function saveResId(id){
    localStorage.setItem("restID",id);
}
function save_R1(id){
    if(document.getElementById('R1').value=="") {
        alert("输入的餐厅名有误")
    }else{
    var loc_R1 = document.getElementById('R1').value;
    localStorage.setItem("input_R1",loc_R1);
    location.href='/modification/showRes?rest_name='+loc_R1
     }
}
function save_U1(id){
    var loc_U1 = document.getElementById('U1').value;
    localStorage.setItem("input_U1",loc_U1);
    location.href='/modification/showUser?user_name='+loc_U1
}
function save_D1(id){
    var loc_D1 = document.getElementById('D1').value;
    localStorage.setItem("input_D1",loc_D1);
    location.href='/modification/showDis?dishes_name='+loc_D1
}
function remo_deleRes() {
    localStorage.removeItem('restaurant_1');
}
function onlyNum() {
    if (!(event.keyCode == 46) && !(event.keyCode == 8) && !(event.keyCode == 37) && !(event.keyCode == 39)) {
        if (!((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode >= 96 && event.keyCode <= 105))) {
            event.returnValue = false;
        }
    }
}